package com.zx.baofu.alcohol.mapper;

import com.zx.baofu.alcohol.model.LotteryProbability;
import com.zx.baofu.alcohol.model.UserLottery;
import com.zx.baofu.alcohol.model.UserOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository(value = "orderMapper")
public interface OrderMapper {
    int userWriteAddress(@Param("unionid") String unionid, @Param("orderNum") String orderNum, @Param("name") String name
            , @Param("mobile") String mobile, @Param("address") String address);

    List<UserOrder> orderList(@Param("text") String text, @Param("claimed") int claimed, @Param("start") int start, @Param("offset") int offset);

    int countOrderList(@Param("text") String text, @Param("claimed") int claimed);

    int claimOrder(int orderId);

    int getProbability();

    int updateProbability(List<LotteryProbability> probabilitys);

    UserOrder userOrder(String unionid);

    int todayPrizeNum();

    List<UserLottery> winList();
    //查询一到三等奖的中奖概率
    List<LotteryProbability> getAllLottery();
    //查看中奖订单
    UserOrder getUserOrder(@Param("id") Long id);
}
